# !/bin/sh
cd /sys/kernel/debug/tracing/

echo 0 > tracing_on
echo nop > current_tracer
echo > set_graph_function
echo function > current_tracer
echo 1 > options/funcgraph-tail

### 跟踪的函数
echo local_pci_probe > set_ftrace_filter
### 不跟踪的函数
# echo > set_ftrace_notrace

echo 1 > options/func_stack_trace
echo 1 > tracing_on

### 执行测试程序
modprobe ahci
# echo 1 > /sys/bus/pci/rescan
### 测试程序执行结束

echo 0 > tracing_on
echo 0 > options/func_stack_trace

cat trace > /root/trace.log
cat /root/trace.log

echo > set_ftrace_filter
echo nop > current_tracer
